import http from "../index";

// 获取列表
export const getArticleApi = async (data) =>
  await http.post("article/search/list", data);

// 编辑
export const editArticleApi = async (data) =>
  await http.post("article/edit/save", data);

// 详情
export const getArticleDetailApi = async (id) =>
  await http.get(`article/${id}`);

// 上传文件
export const uploadArticleApi = async (data) =>
  await http.post("article/upload", data);

// 上架下架
export const operationArticleApi = async (data) =>
  await http.post("article/operation", data);

// 发布文章
export const insertArticleApi = async (data) =>
  await http.post("article/insert/save", data);

// 获取栏目
export const getArticleModuleListApi = async () =>
  await http.get("article/module/list");

export const deleteArticleApi = async (data) =>
  await http.post("article/delete", data);

export const downArticleApi = async (data) =>
  await http.post("article/down/remove", data);

export const delBgImg = async (data) =>
    await http.post("article/del/img", data);
